<template>
  <van-pull-refresh class="box" v-model="isLoading" @refresh="onRefresh">
    <div v-if="!filterIsshow" class="main_box">
      <van-swipe
        class="my-swipe"
        :autoplay="9999999"
        indicator-color="white"
        :initial-swipe="swipeItem ? swipeItem.initialSwipe : 0"
      >
        <van-swipe-item>
          <div class="enterprise_type_box">
            <div
              v-for="(item, index) in swiperlistpageOne"
              :key="index"
              class="enterprise_type"
              :class="item.clickTrue ? 'enterprise_type2' : ''"
              @click="pageOneClick(item)"
            >
              <div class="enterprise_type_icon">
                <img :src="item.imgSrc" alt="" />
              </div>
              <div class="enterprise_type_name">
                {{ item.text }} <br />
                {{ item.text2 }}
              </div>
            </div>
          </div>
        </van-swipe-item>
        <van-swipe-item>
          <div class="enterprise_type_box">
            <div
              v-for="(item, index) in swiperlistTwo"
              :class="item.clickTrue ? 'enterprise_type2' : ''"
              :key="index"
              class="enterprise_type"
              @click="pageOneClick2(item)"
            >
              <div class="enterprise_type_icon">
                <img :src="item.imgSrc" alt="" />
              </div>
              <div class="enterprise_type_name">
                {{ item.text }}
              </div>
            </div>
          </div>
        </van-swipe-item>
        <van-swipe-item>
          <div class="enterprise_type_box">
            <div
              v-for="(item, index) in swiperlistThree"
              :class="item.clickTrue ? 'enterprise_type2' : ''"
              :key="index"
              class="enterprise_type"
              @click="pageOneClick3(item)"
            >
              <div class="enterprise_type_icon">
                <img :src="item.imgSrc" alt="" />
              </div>
              <div class="enterprise_type_name">
                {{ item.text }}<br />{{ item.text2 }}
              </div>
            </div>
          </div>
        </van-swipe-item>
      </van-swipe>
      <div class="contan_box">
        <div class="contan_box_title">
          <div class="contan_box_title_left">
            <div class="leftImg" v-if="topFilter"></div>
            <div class="ygzz_text" v-if="topFilter">{{ topFilter }}</div>
          </div>
          <div class="contan_box_title_right">
            共发现 <span class="enterprise_number">{{ total }}</span
            >家企业
          </div>
        </div>
        <div class="nav_box">
          <div class="type_box">
            <div
              class="type_btn current_location"
              is-link
              @click="showPopup(1)"
              :class="condition.condition1 ? 'type_btn2' : ''"
            >
              <div>
                {{
                  condition.condition1 ? condition.condition1.name : "当前位置"
                }}
              </div>
              <div class="type_btn_img">
                <img
                  src="~img/lookAround/type_btn_true.svg"
                  v-if="condition.condition1"
                  alt=""
                />
                <img src="~img/lookAround/type_btn.svg" v-else alt="" />
              </div>
            </div>
            <div
              class="type_btn"
              is-link
              @click="showPopup(2)"
              :class="condition.condition2 ? 'type_btn2' : ''"
            >
              <div>
                {{
                  condition.condition2 ? condition.condition2.name : "智能排序"
                }}
              </div>
              <div class="type_btn_img">
                <img
                  src="~img/lookAround/type_btn_true.svg"
                  v-if="condition.condition2"
                  alt=""
                />
                <img src="~img/lookAround/type_btn.svg" v-else alt="" />
              </div>
            </div>
            <div
              class="type_btn"
              is-link
              @click="showPopup(3)"
              :class="
                condition.condition3
                  ? 'type_btn2'
                  : condition.condition4
                  ? 'type_btn2'
                  : ''
              "
            >
              <div class="more_btn_img">
                <img
                  src="~img/lookAround/more_icon_true.svg"
                  v-if="condition.condition3 || condition.condition4"
                  alt=""
                />
                <img src="~img/lookAround/more_icon.svg" v-else alt="" />
              </div>
              <div>
                {{
                  condition.condition3
                    ? condition.condition3
                    : condition.condition4
                    ? condition.condition4.name
                    : "发现更多"
                }}
              </div>
              <div class="type_btn_img">
                <img
                  src="~img/lookAround/type_btn_true.svg"
                  v-if="condition.condition3 || condition.condition4"
                  alt=""
                />
                <img src="~img/lookAround/type_btn.svg" v-else alt="" />
              </div>
            </div>
          </div>
          <!-- =============== -->
          <van-list
            class="listBox"
            @load="rollBottom"
            v-model="loading"
            finished-text="没有更多了"
            :finished="finished"
          >
            <corpList
              :originList="originList"
              v-if="originList.length > 0"
            ></corpList>
            <div size="24px" v-else class="loading"></div>
          </van-list>
        </div>
      </div>
    </div>
  </van-pull-refresh>
</template>
<script>
import corpList from "../../components/lookAround/corpList.vue";
import { Toast, Dialog } from "vant";
import { lookAroundV2, fullAmountCorp } from "@/interfaces/lookAround/index.js";
import MeScroll from "mescroll.js";
import "mescroll.js/mescroll.min.css";
export default {
  name: "",

  /*1. Vue扩展 */
  extends: "", // extends和mixins都扩展逻辑，需要重点放前面
  mixins: [],
  components: { corpList },
  /* 2. Vue数据 */
  props: {},
  model: { prop: "", event: "" }, // model 会使用到 props
  data() {
    return {
      isLoading: false,
      filterIsshow: false,
      show1: false,
      show2: false,
      show3: false,
      develop: true,
      distance: 0.5,
      pageNum: 1,
      topFilter: "",
      pageSize: 5,
      extraObj: {},
      total: "",
      originList: [],
      loading: false,
      finished: false,
      searchVal: "",
      condition: {
        condition1: { name: "500m", code: "0.5" },
        condition2: {
          key: "sort1",
          name: "距离由近及远",
          sortColumn: "distance",
          sortRule: "asc",
        },
        condition3: "",
        condition4: "",
      },
      distance: "0.5",
      sortColumn: "creditScore",
      sortRule: "desc",
      region: "",
      swipeItem: "",
      swiperlistpageOne: [
        {
          text: "用工增长",
          text2: "",
          param: "laborTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_yonggongzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "用水增长",
          text2: "",
          param: "waterTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_ysqy.png",
          initialSwipe: 0, //所在第几页
        },

        {
          text: "用电增长",
          text2: "",
          param: "electricTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_ydzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "用气增长",
          text2: "",
          param: "gasTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_yqzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "核心员工",
          text2: "增长",
          param: "corePersonTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_hxygzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "营收前30%",
          text2: "",
          param: "revenueLevel",
          type: "2", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_ysq30%25.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "营收增长",
          text2: "",
          param: "revenueTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_yingshouzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "纳税前30%",
          text2: "",
          param: "taxLevel",
          type: "2", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_nsq30%25.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "纳税增长",
          text2: "",
          param: "taxTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_nashuizz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "净利润增长",
          text2: "",
          param: "netProfitsTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_jlrzz.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "纳税A级",
          text2: "",
          param: "taxALeavel",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page3_nsAj.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "专利增加",
          text2: "",
          param: "patentTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/3.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "进口增长",
          text2: "",
          param: "importTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/2.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "出口增长",
          text2: "",
          param: "exportTrend",
          type: "1", //传值方式
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/1.png",
          initialSwipe: 0, //所在第几页
        },
        {
          text: "环保信用",
          text2: "评价",
          param: "envCredEval",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/18.png",
          initialSwipe: 0, //所在第几页
        },
      ],
      swiperlistTwo: [
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_dzxx.png",
          text: "电子信息",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_szjj.png",
          text: "数字经济",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_gdzbzz.png",
          text: "高端装备制造",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_swyx.png",
          text: "生物医药",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_jcdl.png",
          text: "集成电路",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_qclbj.png",
          text: "汽车零部件",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_xjcl.png",
          text: "先进材料",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_xz.png",
          text: "软件服务",
          text2: "",
          clickTrue: false, //判断是否点击
          initialSwipe: 1, //所在第几页
        },
        {
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version01/zqy_swiper_two_hkht.png",
          clickTrue: false, //判断是否点击
          text: "航空航天",
          text2: "",
          isSelect: false,
          initialSwipe: 1, //所在第几页
        },
      ],

      swiperlistThree: [
        {
          text: "大型企业",
          text2: "",
          param: "bigCorp",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_dxqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "小微企业",
          text2: "",
          param: "smallAndMicroCorp",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_xwqy.png",
          initialSwipe: 2, //所在第几页
        },

        {
          text: "瞪羚企业",
          text2: "",
          param: "isGoats",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_dlqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "外贸企业",
          text2: "",
          param: "isTrade",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_wmqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "高新技术",
          text2: "",
          param: "isHightech",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_gxqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "科技型",
          text2: "中小企业",
          param: "technology",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_kjxzxqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "政府采购",
          text2: "",
          param: "isGovpur",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_zfcg.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "无贷企业",
          text2: "",
          param: "isLoan",
          type: "0", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            " https://zx-1311146360.cos.ap-shanghai.myqcloud.com/version02/zqy_page2_wdqy.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "高成长",
          text2: "创新型企业",
          param: "isUnicorn",
          type: "1", //传值类型
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/4.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "民营企业",
          text2: "100强",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/9.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "民营企业",
          text2: "创新100强",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/8.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "专精特新",
          text2: "",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/10.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "省级企业",
          text2: "技术中心",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/mapDetail/16.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "民营",
          text2: "科技企业",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/mapDetail/15.png",
          initialSwipe: 2, //所在第几页
        },
        {
          text: "全量搜索",
          text2: "",
          param: "",
          clickTrue: false, //判断是否点击
          imgSrc:
            "https://zx-1311146360.cos.ap-shanghai.myqcloud.com/Arrorney_copy/5.png",
          initialSwipe: 2, //所在第几页
        },
      ],
    };
  },
  computed: {},
  watch: {}, // watch 监控的是 props 和 data，有必要时监控computed
  /* 3. Vue资源 */
  filters: {},
  directives: {},
  /* 4. Vue生命周期 */
  created() {},
  mounted() {
    console.log(this.$route, "路由参数");
    if (this.$route.params.condition) {
      this.condition = this.$route.params.condition;
    }
    if (this.$route.params.swipeItem) {
      // 头部标签选中时 直接调用相应的标签方法
      this.swipeItem = this.$route.params.swipeItem;
      this.swipeItem.clickTrue = false;
      if (this.swipeItem.initialSwipe == 0) {
        this.pageOneClick(this.swipeItem);
      } else if (this.swipeItem.initialSwipe == 1) {
        this.pageOneClick2(this.swipeItem);
      } else if (this.swipeItem.initialSwipe == 2) {
        this.pageOneClick3(this.swipeItem);
      }
    } else {
      // 头部标签未选中直接掉接口
      this.getList();
    }
  },
  destroy() {},
  /* 5. Vue方法 */
  methods: {
    onRefresh() {
      setTimeout(() => {
        Toast("刷新成功");
        this.isLoading = false;
        this.pageNum=1
        this.originList=[]
        this.getList();
      }, 1000);
    },
    // 列表接口
    async getList() {
      this.finished = false;
      //选中园区使用园区经纬度 未选中则使用默认经纬度
      let coordinate = this.condition.condition4
        ? this.condition.condition4.coordinate
        : "120.63862787231987,31.26839516978756";
      let userLng = coordinate.split(",")[0];
      let userLat = coordinate.split(",")[1];
      // 当前位置默认0.5km,选中行政区域默认'',选中产业园区默认1km
      let distance = "";
      if (this.condition.condition3) {
        distance = "";
      } else if (this.condition.condition4) {
        distance = 1.0;
      } else if (this.condition.condition1) {
        distance = this.condition.condition1.code;
      } else {
        distance = 0.5;
      }
      const params = {
        distance: distance,
        sortColumn: this.condition.condition2
          ? this.condition.condition2.sortColumn
          : "distance", //
        sortRule: this.condition.condition2
          ? this.condition.condition2.sortRule
          : "asc",
        region: this.condition.condition3 ? this.condition.condition3 : "",
        needToken: true,
        pageBO: {
          pageSize: this.pageSize,
          pageNum: this.pageNum,
        },

        // __proto__: Object,

        userLat: userLat, //31.26839516978756
        userLng: userLng, //120.63862787231987
      };
      console.log(params, "paramsparamsparams");
      const res = await lookAroundV2({ ...params, ...this.extraObj });
      if (res.list.length > 0 && this.pageNum < res.pages) {
        this.loading = false;
        let { list, total } = res;
        // ======================设置不同的标题背景色===============
        for (let i in list) {
          let color = "#D99D9A";
          if (i % 4 === 0) {
            color = "#8BCBB8";
          } else if (i % 3 === 0) {
            color = "#99C1F2";
          } else if (i % 5 === 0) {
            color = "#B8AAD6";
          } else {
            color = "#D99D9A";
          }
          this.$set(list[i], "background", color);
        }
        // =======================================================
        this.originList = this.originList.concat(list);
        this.total = total;
      } else {
        this.finished = true;
      }
    },
    // 第一个滚动的页面图标点击
    pageOneClick(item) {
      this.swipeItem = item;
      this.originList = [];
      this.total = "";
      this.pageNum = 1;
      if (!item.clickTrue) {
        // 选中
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
          // 点击当前图标
          if (e.text == item.text && e.text2 == item.text2) {
            e.clickTrue = true;
          }
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
        });
        if (item.type == "1") {
          this.extraObj = {
            [item.param]: "1",
          };
          this.getList();
        } else if (item.type == "2") {
          this.extraObj = {
            [item.param]: "30",
          };
          this.getList();
        }
        // 筛选标题反显
        this.topFilter = item.text + item.text2;
      } else {
        // 取消
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
        });
        this.extraObj = {};
        // 筛选标题清空
        this.topFilter = "";
        this.getList();
      }
    },
    pageOneClick2(item) {
      this.swipeItem = item;
      this.topFilter = item.text + item.text2;
      this.originList = [];
      this.total = "";
      this.pageNum = 1;
      if (!item.clickTrue) {
        // 选中
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
          // 点击当前图标
          if (e.text == item.text && e.text2 == item.text2) {
            e.clickTrue = true;
          }
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
        });
        // 点击当前图标
        // item.clickTrue = true;
        this.extraObj = {
          keyIndustries: item.text,
        };
        // 筛选标题反显
        this.topFilter = item.text + item.text2;
      } else {
        console.log("到这里了");
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
        });
        // 筛选标题反显
        this.topFilter = "";
        this.extraObj = {};
      }

      this.getList();
    },
    pageOneClick3(item) {
      this.swipeItem = item;
      this.topFilter = item.text + item.text2;
      this.originList = [];
      this.total = "";
      this.pageNum = 1;
      if (!item.clickTrue) {
        // 选中
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
          // 点击当前图标
          if (e.text == item.text && e.text2 == item.text2) {
            e.clickTrue = true;
          }
        });
        // 点击当前图标
        item.clickTrue = true;
        if (item.type == "1") {
          this.extraObj = {
            [item.param]: "1",
          };
        } else if (item.type == "0") {
          this.extraObj = {
            [item.param]: "0",
          };
        }
        // 筛选标题反显
        this.topFilter = item.text + item.text2;
      } else {
        // 第一个数组全部取消点击
        this.swiperlistpageOne.forEach((e) => {
          e.clickTrue = false;
        });
        // 第二个数组全部取消点击
        this.swiperlistTwo.forEach((e) => {
          e.clickTrue = false;
        });
        // 第三个数组全部取消点击
        this.swiperlistThree.forEach((e) => {
          e.clickTrue = false;
        });
        // 筛选标题反显
        this.topFilter = "";
        this.extraObj = {};
      }
      this.getList();
    },

    // 筛选按钮
    showPopup(type) {
      this.$router.push({
        path: "/conditiFilter",
        query: {
          type: type,

          condition: this.condition,
          topFilter: this.topFilter,
          swipeItem: this.swipeItem,
        }, // 要传递的参数
      });
    },
    // 列表滚动到底部
    rollBottom() {
      this.pageNum = this.pageNum + 1;
      this.getList();
    },
  }, // all the methods should be put here in the last
};
</script>
<style scoped lang="scss">
.box {
  display: flex;
  flex-flow: column;
  // position: absolute;
  // left: 0;
  // right: 0;
  // top: 0;
  // bottom: 0;
  height: 100%;
  overflow: auto;
  font-family: PuHuiTi65;
}
.main_box {
  display: flex;
  flex-flow: column;
  flex: 1;
  // overflow: hidden;
}
.my-swipe .van-swipe-item {
  // color: #fff;
  // font-size: 20px;
  text-align: center;
  // background-color: #39a9ed;
}
.enterprise_type {
  width: 20%;
  // margin-top: 10px;
  // height: 72px;
  margin-top: 15px;
  // padding: 10px 0 0 0;
  // background-color: red;
}
.enterprise_type2 {
  background-color: #f1f6f9;
}
/deep/.van-swipe-item {
  line-height: 25px !important;
}
/deep/.van-swipe__indicator--active {
  background-color: #3282e4 !important;
}
/deep/.van-swipe__indicator {
  background-color: #dae0e3;
}
.enterprise_type_box {
  display: flex;
  flex-wrap: wrap;
  // margin-left: 2.5%;
  // justify-content: center;
  padding: 10px 20px 30px 20px;
}
.enterprise_type_icon {
  img {
    height: 30px;
  }
}
.enterprise_type_name {
  font-size: 12px;

  line-height: 17px;
  // height: 50px;
}
.contan_box {
  width: 100%;
  flex: 1;
  background-color: #f1f6f9;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-flow: column;
  overflow: hidden;
}
.enterprise_number {
  color: #d64130;
}
.contan_box_title {
  display: flex;
  justify-content: space-between;
  height: 40px;
  line-height: 40px;
  padding: 0 10px;
  // background-color: #d64130;
}
.contan_box_title_left {
  display: flex;
}
.contan_box_title_right {
  font-size: 13px;
  font-family: PuHuiTi65;
  margin-right: 10px;
}
.leftImg {
  border-left: 4px solid #3282e4;
  height: 15px;
  margin-top: 12.5px;
  margin-right: 5px;
  // width: 5rpx;
}
.ygzz_text {
  // font-weight: bold;
  font-size: 16px;
  font-family: PuHuiTi65;
}
// ==================

.nav_box {
  width: 100%;
  flex: 1;
  background-color: white;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-flow: column;
  overflow: hidden;
  // padding: 0 10px;
}

.corporation_info_box {
  padding: 0 10px;
}
.Enterprise_Info_one {
  display: flex;
}
.Enterprise_icon {
  width: 38px;
  padding: 1px 0 4px 0;
  background-color: #d99d9a;
  font-size: 13px;
  color: white;
  text-align: center;
  border-radius: 5px;
  height: fit-content;
}
.Enterprise_Info_Name {
  font-weight: bold;
  font-size: 18px;
}
.Enterprise_Info_one_right {
  flex: 1;
  margin-left: 5px;
}
.Enterprise_Info_logo {
  img {
    height: 25px;
  }
}
.Enterprise_grade {
  display: flex;
}
.Enterprise_grade_number {
  font-weight: bold;
  background-color: #f6e6e1;
}
.Enterprise_grade_text {
  background-color: #c33d28;
  color: white;
}
.label_box {
  height: 20px;
  padding: 0 10px;
}
.Enterprise_Info_one_label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
}
.label_margin_left {
  margin-left: 7px;
}
.cx {
  background-color: #e3f2ed;
  color: #3f9f71;
}
.tzgl {
  background-color: #e4efff;
  color: #3282e4;
}
.margin_top {
  margin-top: 8px;
}
.gjj {
  background-color: #f9e9dc;
  color: #9f6c3f;
}
.Enterprise_Info_two {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  text-align: center;
  margin-top: 15px;
}
.Enterprise_Info_title {
  color: #989898;
  font-size: 12px;
}
.Enterprise_Info_name {
  margin-top: 3px;
  font-size: 13px;
}
.cut_apart {
  width: 1px;
  height: 30px;
  background-color: #f4f4f4;
}
.Enterprise_Info_box {
  width: 33%;
  height: 45px;
  // background-color: #3f9f71;
}
.Enterprise_Info_three {
  display: flex;
  border-top: 1px solid #f4f4f4;
  border-bottom: 1px solid #f4f4f4;
  height: 30px;
  line-height: 30px;
}
.telephone_icon {
  // margin-top: 2px;
  img {
    width: 15px;
  }
}
.coordinate_icon {
  // margin-top: 2px;
  img {
    width: 13px;
  }
}
.telephone_number {
  color: #3282e4;
}
.Enterprise_Info_four {
  display: flex;
  align-items: center;
  // background-color: red;
  height: 30px;
  // line-height: 30px;
}
.cut_apart2 {
  width: 1px;
  height: 13px;
  background-color: #9f9f9f;
  margin: 5px;
}
.coordinate_name {
  font-size: 13px;
  color: #3282e4;
}
.bottom_cut {
  height: 7px;
  width: 100%;
  background-color: #f6f6f6;
}
.corporation_big_box {
  // background-color: red;
  overflow: auto;
  // height: 200px;
  flex: 1;
}
.touch_down_icon {
  text-align: center;
  img {
    width: 30px;
  }
}
.type_box {
  display: flex;
  margin-top: 10px;
  // margin-bottom: 10px;
  padding: 0 10px;
}
.type_btn {
  // width: 80px;

  padding: 0 10px;
  height: 24px;
  line-height: 24px;
  // padding: 0 10px;
  margin-right: 10px;
  background-color: #f3f3f3;
  color: #6a6a6a;
  font-size: 12px;
  text-align: center;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  img {
    // margin-top: 10px;
  }
}
.current_location {
  min-width: 80px;
}
.type_btn_img {
  line-height: 30px;
  // margin-left: 3px;
  img {
    width: 12px;
  }
}
.more_btn_img {
  line-height: 30px;
  margin-left: 3px;
  img {
    width: 16px;
  }
}
.type_btn2 {
  background-color: #e4efff !important;
  color: #3282e4 !important;
}
.dqwz_text {
  width: 100%;
  background-color: #fafafa;
  padding: 10px;
  font-size: 13px;
}
.dqwz_text2 {
  width: 100%;
  padding: 10px;
  font-size: 15px;
}
.view_more_title {
  padding: 10px;
  font-weight: bold;
  font-size: 15px;
}
.listBox {
  // overflow: auto;
  // flex: 1;
  background-color: white;
  // min-height: 465px;
}
.loading {
  width: 100%;
  height: 50px;
  // background-color: red;
}
</style>
